<?php
    session_start();
                if(!isset($_SESSION["userlogin"])){
                $_SESSION['thongbao']= "Bạn vui lòng đăng nhập theo đúng quy trình. Xin cám ơn!";
                header("location:../index.php");
                }    
?>
<html>
    <head>
        <title>Đề án</title>
        <meta http-equiv="content-type" content="text/html; charset = utf-8" />
        <link rel="stylesheet" type="text/css" href="../style.css" />
        <script language="javascript">
            
        </script>

    </head>
    <body>
    <div id="wrap">
        
        <?php
            if($_SESSION['vaitro'=="Quản Trị"]){
               $duongdan1="../include/mod_menu_admin.php";
               $duongdan2="window.location = '../admin/tinnhan.php'" ;
                
            }else{
               $duongdan1="../include/mod_menu.php";
               $duongdan2="window.location = '../view/tinnhan.php'" ;                
            }
	       include "../include/header.php";
           include "$duongdan1";
           //include "../util/dataUtil.php";
            
            $idtinnhan = $_GET['id'];

            $xoa_tinnhan = "delete from tinnhangui where id='$idtinnhan'";
            
            
            echo "  <script>
                        alert ('Bạn vừa xoá một tin nhắn!');
                        $duongdan2;
                    </script>"; 

               executeQuery($xoa_tinnhan);    
        ?> 
            
     </div>
    </body>
</html>